<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    template="layout/template.xhtml">

<ui:define name="body">

    <rich:panel>
        <f:facet name="header">Avaliacao item Details</f:facet>

        <s:decorate id="idtAvaliacaoItem" template="layout/display.xhtml">
            <ui:define name="label">Idt avaliacao item</ui:define>
            <h:outputText value="#{avaliacaoItemHome.instance.idtAvaliacaoItem}"/>
        </s:decorate>

        <s:decorate id="numNota" template="layout/display.xhtml">
            <ui:define name="label">Num nota</ui:define>
            <h:outputText value="#{avaliacaoItemHome.instance.numNota}"/>
        </s:decorate>

        <div style="clear:both"/>

    </rich:panel>

    <div class="actionButtons">

        <s:button view="/AvaliacaoItemEdit.xhtml"
                    id="edit"
                 value="Edit"/>

        <s:button view="/#{empty avaliacaoItemFrom ? 'AvaliacaoItemList' : avaliacaoItemFrom}.xhtml"
                    id="done"
                 value="Done"/>

    </div>

    <rich:tabPanel switchType="ajax">

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/manytoone.gif" style="vertical-align: middle; padding-right: 4px;"/>Avaliacao</h:panelGroup>
        </f:facet>
    <div class="association" id="avaliacaoParent">

        <h:outputText value="There is no avaliacao associated with this avaliacaoItem."
                   rendered="#{avaliacaoItemHome.instance.avaliacao == null}"/>

        <rich:dataTable var="_avaliacao"
                   value="#{avaliacaoItemHome.instance.avaliacao}"
                rendered="#{avaliacaoItemHome.instance.avaliacao != null}"
              rowClasses="rvgRowOne,rvgRowTwo"
                      id="avaliacaoTable">
            <h:column>
                <f:facet name="header">Idt avaliacao</f:facet>
                <h:outputText value="#{_avaliacao.idtAvaliacao}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Disciplina idt disciplina</f:facet>
                <h:outputText value="#{_avaliacao.disciplina.idtDisciplina}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Turma idt turma</f:facet>
                <h:outputText value="#{_avaliacao.turma.idtTurma}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Cod avaliacao</f:facet>
                <h:outputText value="#{_avaliacao.codAvaliacao}"/>
            </h:column>
            <h:column styleClass="action">
                <f:facet name="header">Action</f:facet>
                <s:link id="viewavaliacao"
                     value="View"
                      view="/Avaliacao.xhtml">
                    <f:param name="avaliacaoIdtAvaliacao"
                           value="#{_avaliacao.idtAvaliacao}"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </div>
    </rich:tab>

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/manytoone.gif" style="vertical-align: middle; padding-right: 4px;"/>Aluno</h:panelGroup>
        </f:facet>
    <div class="association" id="alunoParent">

        <h:outputText value="There is no aluno associated with this avaliacaoItem."
                   rendered="#{avaliacaoItemHome.instance.aluno == null}"/>

        <rich:dataTable var="_aluno"
                   value="#{avaliacaoItemHome.instance.aluno}"
                rendered="#{avaliacaoItemHome.instance.aluno != null}"
              rowClasses="rvgRowOne,rvgRowTwo"
                      id="alunoTable">
            <h:column>
                <f:facet name="header">Idt aluno</f:facet>
                <h:outputText value="#{_aluno.idtAluno}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Dat nascimento</f:facet>
                <h:outputText value="#{_aluno.datNascimento}">
                    <s:convertDateTime type="date" dateStyle="short"/>
                </h:outputText>
            </h:column>
            <h:column>
                <f:facet name="header">Nom aluno</f:facet>
                <h:outputText value="#{_aluno.nomAluno}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Num cpf</f:facet>
                <h:outputText value="#{_aluno.numCpf}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Num ra</f:facet>
                <h:outputText value="#{_aluno.numRa}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Num rg</f:facet>
                <h:outputText value="#{_aluno.numRg}"/>
            </h:column>
            <h:column styleClass="action">
                <f:facet name="header">Action</f:facet>
                <s:link id="viewaluno"
                     value="View"
                      view="/Aluno.xhtml">
                    <f:param name="alunoIdtAluno"
                           value="#{_aluno.idtAluno}"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </div>
    </rich:tab>
</rich:tabPanel>
</ui:define>

</ui:composition>
